﻿#if UNITY_EDITOR
using System;
using UnityEngine;
/// <summary>
/// 工程快捷按钮属性
/// </summary>
[AttributeUsage(AttributeTargets.Method, Inherited = true, AllowMultiple = false)]
public class ESF_ProjectQuickButtonAttribute : PropertyAttribute
{
    /// <summary>
    /// 构造函数
    /// </summary>
    /// <param name="_descFormat">描述Format</param>
    /// <param name="_args">Format参数组件</param>
    public ESF_ProjectQuickButtonAttribute(string _descFormat, params ESF_enGUIDisplayWord[] _args)
    {
        if (_args != null)
        {
            string[] val = new string[_args.Length];
            for (int i = 0; i < _args.Length; i++)
            {
                val[i] = _args[i].ESF_ToAlias();
            }
            desc = string.Format(_descFormat, val);
        }
        else
        {
            desc = _descFormat;
        }
    }

    /// <summary>
    /// 描述
    /// </summary>
    public string desc { get; private set; }
}
#endif
